function XSLTransformer (FOCS) {   
    var MODE = FOCS;
    		    		
	this.calculate = (MODE)?(
		function(target,xmlparameter,xslparameter,callback) {
			var processor = new XSLTProcessor();
            if ($.isFunction(processor.transformDocument)) {
                // Mozilla interface
                var resultDoc = document.implementation.createDocument("", "", null);
                processor.transformDocument(xmlparameter.responseXML, xslparameter.responseXML, resultDoc, null);
                target.html(new XMLSerializer().serializeToString(resultDoc));
            }
            else {
                processor.importStylesheet(xslparameter.responseXML);
                var resultDoc = processor.transformToFragment(xmlparameter.responseXML, document);
                target.empty().append(resultDoc);
            }
			callback();
			
		}):(
		function(target,xmlparameter,xslparameter,callback) {
			var interval = setInterval(function() {
            	var out;
            	try {
                	out = xmlparameter.transformNode(xslparameter.XMLDocument);
                	clearInterval(interval);
					callback();
					
            	} catch (e) {
            		error(e.name + ":" + e.message + " >>> Element:"+target.attr("id"));
            		debug("Trying to reload sources... >>> Element:"+target.attr("id"));
            	} finally {
            		target.html(out);
            	}	
        	},10);
		});
}